﻿Imports System.Windows.Forms

Public Class frmShortcuts
    Inherits Form

    Private Sub btnStorage_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnStorage.Click
        System.Diagnostics.Process.Start("http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET")
        System.Diagnostics.Process.Start("http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx")
    End Sub

    Private Sub cbxSelector_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cbxSelector.SelectedIndexChanged
        olv1.ShowGroups = False
        Select Case cbxSelector.Text
            Case "Lookup DLLs"
                olv1.ShowGroups = True
                olv1.SetObjects(PHelp.Data_Classes.Reference.GetReferences())

                BIS.Generator.GenerateColumns(olv1, Type.[GetType](New PHelp.Data_Classes.Base_Shortcut().[GetType]().FullName))
                olv1.BuildGroups(olv1.GetColumn(0), SortOrder.Ascending, olv1.GetColumn(1), SortOrder.Ascending, olv1.GetColumn(1), SortOrder.Ascending)
                For Each Item As BIS.OLVGroup In olv1.OLVGroups
                    Item.Collapsed = True
                Next
            Case "Software"
                olv1.ShowGroups = True
                olv1.SetObjects(PHelp.Data_Classes.Software.GetSoftware())

                BIS.Generator.GenerateColumns(olv1, Type.[GetType](New PHelp.Data_Classes.Base_Shortcut().[GetType]().FullName))
                olv1.BuildGroups(olv1.GetColumn(0), SortOrder.Ascending, olv1.GetColumn(1), SortOrder.Ascending, olv1.GetColumn(1), SortOrder.Ascending)
                For Each Item As BIS.OLVGroup In olv1.OLVGroups
                    Item.Collapsed = True
                Next
            Case "Visual Studio"
                olv1.ShowGroups = True
                olv1.SetObjects(PHelp.Data_Classes.VisualStudio.GetItems())

                BIS.Generator.GenerateColumns(olv1, Type.[GetType](New PHelp.Data_Classes.Base_Shortcut().[GetType]().FullName))
                olv1.BuildGroups(olv1.GetColumn(0), SortOrder.Ascending, olv1.GetColumn(1), SortOrder.Ascending, olv1.GetColumn(1), SortOrder.Ascending)
                For Each Item As BIS.OLVGroup In olv1.OLVGroups
                    Item.Collapsed = True
                Next
        End Select
    End Sub

    Private Sub olv1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles olv1.SelectedIndexChanged
        propertyGrid1.SelectedObject = olv1.SelectedObject
    End Sub

End Class
